package com.yc.index.web;

import com.yc.entity.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "Carttoon-resources" )
public interface ResourceAction {
    @RequestMapping("cartoon/queryAll")
    public List< Cartoon > queryAll();

    @RequestMapping("cartoon/map")
    public List< Cartoon > map();

    @RequestMapping("cartoon/banner")
    public List<Cartoon> banner();

    @RequestMapping("cartoon/queryByCtid")
    public List< Cartoon > queryByCtid(@RequestParam Integer ctid);

    @RequestMapping("cartoon/queryByCsname")
    public List<Cartoon> queryByCsnameCartoon(@RequestParam String csname);

    @RequestMapping("cartoon/queryByTypes")
    public List< Cartoon > queryByTypes(@RequestBody List<String> types);

    @RequestMapping("cartoon/queryByTypesOrderByCscore")
    public List< Cartoon > queryByTypesOrderByCscore(@RequestBody List<String> types);

    @RequestMapping("cartoon/queryByDate")
    public List<Cartoon> queryByDate(@RequestParam String date);

    @RequestMapping("cartoon/addCartoon")
    public Integer addCartoon(@RequestBody List<Cartoon> list);

    @RequestMapping("cartoon/deleteByCtid")
    public Integer deleteByCtid(@RequestParam Integer ctid);

    @RequestMapping("cartoon/update")
    public Integer updateCartoon(@RequestBody List<Cartoon> list);

    @RequestMapping("cartoon/queryByCname")
    public List<Cartoon> queryByCname(@RequestParam String cname);

    @RequestMapping("cartoon/queryCname")
    public List<Cartoon> queryCname(@RequestParam String cname);

    @RequestMapping("cartoon/queryByctype")
    public List<Cartoon> queryByctype(@RequestParam String ctype);

    @RequestMapping("cartoon/queryByprota")
    public List<Cartoon> queryprota(@RequestParam String prota);

    @RequestMapping("cartoon/queryBydirector")
    public List<Cartoon> querydirector(@RequestParam String director);

    @RequestMapping("cartoon/queryjimdoo")
    public  List<Cartoon> queryjimdoo(@RequestParam String classname,@RequestParam String ctype,@RequestParam String time,@RequestParam String version,@RequestParam String qtype);

    /**
     * 根据传入的动漫id进行查询分类，如果结果为空则分类为新旧番剧
     * @param ctid
     * @return
     */
    @RequestMapping("categorysecord/banner")
    public String banner(@RequestParam Integer ctid);

    /**
     * 根据传入的动漫id进行查询版本
     * @param ctid
     * @return
     */
    @RequestMapping("categorysecord/queryEdition")
    public String queryEdition(@RequestParam Integer ctid);

    /**
     * 根据分类名从categorysecord表中查询出对应的csid,以list集合返回
     * @param list
     * @param edition
     * @return
     */
    @RequestMapping("categorysecord/queryByCsname")
    public List<Categorysecord> queryByCsnameCS(@RequestBody List<Cartoon> list,@RequestParam String edition,@RequestParam String classname);

    @RequestMapping("categorysecord/queryByCid")
    public List<Categorysecord> queryByCid(@RequestParam Integer cid);

    @RequestMapping("pmap/queryByCtid")
    public List< Pmap > queryByCtidPmap(@RequestParam Integer ctid);

    @RequestMapping("pmap/queryPname")
    public List< Pmap > queryPname(@RequestParam Integer ctid);

    @RequestMapping("pmap/queryPlayAddress")
    public List<Pmap> queryPlayAddress(@RequestParam Integer ctid, @RequestParam String pname,@RequestParam String cpname);

    @RequestMapping("pmap/addPmap")
    public Integer addPmap(@RequestBody List<Pmap> list);

    @RequestMapping("pmap/update")
    public Integer updatePmap(@RequestBody List<Pmap> list);

    @RequestMapping("pmap/deleteByCtid")
    public Integer deleteByCtidPmap(@RequestParam Integer ctid,@RequestParam String pname);

    @RequestMapping("pmap/queryByPid")
    public List<Pmap> queryByPid(@RequestParam Integer pid);

    @RequestMapping("cmap/addCmap")
    public Integer addCmap(@RequestParam Integer ctid,@RequestBody List<Categorysecord> categorysecordList);

    @RequestMapping("cmap/deleteByCtid")
    public Integer deleteByCtidCmap(@RequestParam Integer ctid);

    @RequestMapping("rank/queryAll")
    public List< Rank > queryAllRank();

    @RequestMapping("rank/queryByCsname")
    public List< Rank > queryByCsname(@RequestParam String csname);

    @RequestMapping("rankweek/queryAll")
    public List< Rankweek > queryAllRankWeek();

    @RequestMapping("rankweek/queryByCsname")
    public List< Rankweek > queryByCsnameWeek(@RequestParam String csname);

    @RequestMapping("rankmonth/queryAll")
    public List< Rankmonth > queryAllRankMonth();

    @RequestMapping("rankmonth/queryByCsname")
    public List< Rankmonth > queryByCsnameMonth(@RequestParam String csname);

    @RequestMapping("comment/queryByCtid")
    public List<Comment> queryByCtidComment(@RequestParam Integer ctid);

    @RequestMapping("comment/addPraise")
    public Integer addPraise(@RequestParam Integer cmid,@RequestParam Integer ctid,@RequestParam Integer uid);

    @RequestMapping("comment/addStamp")
    public Integer addStamp(@RequestParam Integer cmid,@RequestParam Integer ctid,@RequestParam Integer uid);

    @RequestMapping("comment/discuss")
    public Integer discuss(@RequestParam Integer ctid,@RequestParam Integer uid,@RequestParam String massage);

    @RequestMapping("commentsecord/queryByCmid")
    public List<Commentsecord> queryByCmidCommentsecord(@RequestParam Integer cmid);

    @RequestMapping("commentsecord/addStamp")
    public Integer addReStamp(@RequestParam Integer cmid,@RequestParam Integer uid,@RequestParam Integer cmsid);

    @RequestMapping("commentsecord/addPraise")
    public Integer addRePraise(@RequestParam Integer cmid,@RequestParam Integer uid,@RequestParam Integer cmsid);

    @RequestMapping("commentsecord/addReview")
    public Integer addReview(@RequestParam Integer cmid,@RequestParam Integer uid,@RequestParam String massage);

    @RequestMapping("comment2/queryComment2")
    public  List<Comment2>  queryComment2();

    @RequestMapping("comment2/queryComment3")
    public  List<Comment2>  queryComment(@RequestParam Integer uid);

    @RequestMapping("comment2/addmessage")
    public  Integer addmessage(@RequestParam Integer uid,@RequestParam String message);
}
